<!--<?php 
print <<<EOT
-->
		<div class="content fl">
<!-- 
EOT;
if($admincheck || $superedit || $superdelete ){
print <<<EOT
--> 		
			<form action="mawhole.php?" method="post" id="search" name="SEARCH">
			 <input type="hidden" value="$verifyhash" name="verify">
			<input type="hidden" name="action" value="" id="action" />
			<input type="hidden" name="fid" value="$fid" />
<!-- 
EOT;
}
print <<<EOT
-->   	
        	<div class="s_dlA">
<!-- 
EOT;
foreach($threads as $thread){
print <<<EOT
-->       	
            	<dl id="search_{$thread[tid]}">
                	<dt>
<!-- 
EOT;
if($admincheck || $superedit ){
print <<<EOT
-->                   	
                	<input type="checkbox" value="$thread[tid]" name="tidarray[]"> 
<!-- 
EOT;
}
$threadUrl = ($threadrange == 3) ? "job.php?action=topost&tid=".$thread[tid]."&pid=".$thread[pid] : "read.php?tid=".$thread[tid];
print <<<EOT
-->                	
                	<a href="{$threadUrl}" target="_blank">$thread[subject]</a></dt>
                    <dd class="text">$thread[content]</dd>
                    <dd class="cite"><a href="$db_bbsurl" target="_blank">论坛</a>&nbsp;&raquo;&nbsp;<a href="thread.php?fid={$thread[fid]}" target="_blank" class="mr20">{$thread[name]}</a>作者：<a href="u.php?uid=$thread[authorid]" target="_blank" class="mr20">$thread[author]</a>
                    <span class="mr20">$thread[postdate]</span>
<!-- 
EOT;
if($admincheck || $superedit ){
print <<<EOT
-->                     
                    <a href="post.php?action=modify&fid={$thread[fid]}&tid={$thread[tid]}&pid=tpc&article=0" target="_blank" class="s2">[编辑]</a>
<!-- 
EOT;
}
print <<<EOT
-->                      
                    </dd>
                </dl>
<!-- 
EOT;
}
print <<<EOT
--> 
                <div class="pages">
                   $pager
                </div>
                <div class="c">&nbsp;</div>
            </div>
<!-- 
EOT;
if($admincheck || $superdelete || $superedit ){
print <<<EOT
-->              
            <div class="h">
            	<div class="manage">
                <input name="" type="checkbox" value="" onclick="CheckAll(this.form)" >全选 
<!-- 
EOT;
if($admincheck && $fid ){
print <<<EOT
-->                                
                <a href="javascript:;" onclick="searchSubmit('headtopic');">置顶</a><a href="javascript:;" onclick="searchSubmit('digest');">精华</a><a href="javascript:;" onclick="searchSubmit('lock');">锁定</a><a href="javascript:;" onclick="searchSubmit('pushtopic');">提前</a><a href="javascript:;" onclick="searchSubmit('downtopic');">压帖</a><a href="javascript:;" onclick="searchSubmit('edit');">加亮</a><a href="javascript:;" onclick="searchSubmit('type');">分类主题</a><a href="javascript:;" onclick="searchSubmit('move');">移动</a><a href="javascript:;" onclick="searchSubmit('copy');">复制</a><a href="javascript:;" onclick="searchSubmit('del');">删除</a>
<!-- 
EOT;
}
print <<<EOT
-->   
<!-- 
EOT;
if( $superdelete && !$fid ){
print <<<EOT
-->               
                <a href="javascript:;" onclick="searchSubmit('delall');">删除</a>
<!-- 
EOT;
}
print <<<EOT
-->                 
                </div>
            </div>
            </form>
<!-- 
EOT;
}
print <<<EOT
-->             
        </div>

        <div class="sidebar fr">
        	<div>{$rightSearchResult}</div>
<!--
EOT;
if($hotwords){
print <<<EOT
-->         
        	<div class="p15 s_boxA">
            	<h2>一周热门搜索</h2>
                <ul>
<!-- 
EOT;
foreach($hotwords as $hotword){
print <<<EOT
-->                
                	<li><a href="searcher.php?keyword={$hotword}&type=thread">$hotword</a></li>
<!-- 
EOT;
}
print <<<EOT
-->                 	
                </ul>
            </div>
<!-- 
EOT;
}
print <<<EOT
-->
        </div>
        
        <div class="c">&nbsp;</div>
<script type="text/javascript">
	var searchSubmit = function(type){
		if(!type) return false;
		getObj("action").value = type;
		var form = getObj("search");
		var ischeck = false;
		var del = [];
		var threadIds = '';
		var count = 0;
		for (var i = 0; i < form.elements.length; i++) {
			var e = form.elements[i];
			if (e.type == 'checkbox' && e.checked == true ) {
				var v = e.value;
				ischeck = true;
				threadIds += v+"|";
				del.push(v);
				count += 1;
			}
		}
		if(!ischeck){
			showDialog('error',"请选择操作的帖子");
			return false;
		}
		if(type == "delall"){
			showDialog("confirm","确定要删除帖子吗?",0,function(){
				var data = "&fid=all&step=2&verify={$verifyhash}&tidarray="+threadIds;
				ajax.send("mawhole.php?action=delall&ajax=1",data,function(){
					for(i=0;i<del.length;i++){
						var t = document.getElementById("search_"+del[i]);
						if(t){
							t.innerHTML="";
						}
					}
					if(count >= 10){
						location.href = 'searcher.php?keyword={$keyword}&type=thread';
					}else{
						showDialog('success',ajax.request.responseText,1);
					}
				});
			});
			return false;
		}
		setTimeout(function(){
			form.submit();
		},0);
	}
</script>
<!--
EOT;
?>-->